package com.xunfang.task;

import lombok.extern.slf4j.Slf4j;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

@Slf4j
@Component  //放到Spring中容器
public class DemoTask {

    @Scheduled(cron = "*/5 * * * * *")
    public void updateInventory() {
        log.info("更新库存信息");
    }

}